<%-- 
    Document   : colorcode
    Created on : Jun 3, 2010, 11:02:24 PM
    Author     : btapley
--%>
<%@page contentType="text/html" import="java.util.Map, com.uwyn.jhighlight.renderer.*" pageEncoding="UTF-8"%>
<%@taglib prefix="uwyn" uri="/WEB-INF/uwyn.tld" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <style type="text/css">
            <%
                        CppXhtmlRenderer r = new CppXhtmlRenderer();

                        for (Object entry : r.DEFAULT_CSS.entrySet()) {
                            String [] i = entry.toString().split("=");
                            out.println(i[0] + "{" + i[1] + "}");
                        }
                        
                        pageContext.setAttribute("crenderer", r);

                        XmlXhtmlRenderer x = new XmlXhtmlRenderer();

                        for (Object entry : x.DEFAULT_CSS.entrySet()) {
                            String [] i = entry.toString().split("=");
                            out.println(i[0] + "{" + i[1] + "}");
                        }

                        pageContext.setAttribute("xrenderer", x);
            %>
        </style>
    </head>
    <body>
        <h1>Color Code Test</h1>
        <uwyn:colorcode renderer="${xrenderer}">hello <code>xml</code></uwyn:colorcode>
<uwyn:colorcode renderer="${crenderer}">
    is { this: c++; }
    and.whataboutscripts (like) { this.stuff; }
</uwyn:colorcode>
    </body>
</html>
